package jp.co.sn.mml.pojo.tmbkitem;

import jp.co.sn.mml.pojo.tmitem.Tmitem;
import jp.co.sn.mml.pojo.tmitem.Tmitem;

public class TmbkitemId implements java.io.Serializable { 

	//分画項目コード
	private Tmitem bkItemCd;
	//検査項目コード
	private Tmitem ksItemCd;

	/** default constructor */
	public TmbkitemId(){

	}

	/** full constructor */
	public TmbkitemId(Tmitem bkItemCd,Tmitem ksItemCd){
		this.bkItemCd = bkItemCd;
		this.ksItemCd = ksItemCd;
	}

	//Property accessors
	public Tmitem getBkItemCd(){
		return this.bkItemCd;
	}

	public void setBkItemCd(Tmitem bkItemCd){
		this.bkItemCd=bkItemCd;
	}

	public Tmitem getKsItemCd(){
		return this.ksItemCd;
	}

	public void setKsItemCd(Tmitem ksItemCd){
		this.ksItemCd=ksItemCd;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TmbkitemId))
			return false;

		TmbkitemId castOther = (TmbkitemId) other;

		return ((this.getBkItemCd() ==  castOther.getBkItemCd())
				||(this.getBkItemCd()!=null && castOther.getBkItemCd() !=null 
					&& castOther.getBkItemCd() !=null 
					&& this.getBkItemCd().equals(castOther.getBkItemCd())))
			&& ((this.getKsItemCd() ==  castOther.getKsItemCd())
				||(this.getKsItemCd()!=null && castOther.getKsItemCd() !=null 
					&& castOther.getKsItemCd() !=null 
					&& this.getKsItemCd().equals(castOther.getKsItemCd())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getBkItemCd() == null ? 0 : this.getBkItemCd().hashCode());
		result = 37 * result
				+ (getKsItemCd() == null ? 0 : this.getKsItemCd().hashCode());
		return result;
	}

}